import Vue from 'vue'
import Router from 'vue-router'
import routes from './routes'
Vue.use(Router)

const vueRouter = new Router({ routes });

//登陆判断
// vueRouter.beforeEach((to, from, next) => {
//     if (to.meta.requireAuth) {
//         const JID = localStorage.getItem("__JID__");
//         if (JID) {
//             next();
//         } else {
//             next({
//                 path: "/"
//             });
//             localStorage.clear();
//         }
//     } else {
//         next();
//     }
// });

export default vueRouter

